home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / Universal Headers 2.0.1f / FSM.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-22  |  34.8 KB  |  944 lines  |  [TEXT/MMCC]

  1. /*
  2.      File:        FSM.h
  3.  
  4.      Contains:    HFS External File System Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __FSM__
  21. #define __FSM__
  22.  
  23.  
  24. #ifndef __FILES__
  25. #include <Files.h>
  26. #endif
  27. /*    #include <Types.h>                                            */
  28. /*        #include <ConditionalMacros.h>                            */
  29. /*    #include <MixedMode.h>                                        */
  30. /*    #include <OSUtils.h>                                        */
  31. /*        #include <Memory.h>                                        */
  32.  
  33. #ifdef __cplusplus
  34. extern "C" {
  35. #endif
  36.  
  37. #if PRAGMA_ALIGN_SUPPORTED
  38. #pragma options align=mac68k
  39. #endif
  40.  
  41. #if PRAGMA_IMPORT_SUPPORTED
  42. #pragma import on
  43. #endif
  44.  
  45.  
  46. enum {
  47. /*    The new volume mount flags */
  48.     volMountInteractBit            = 15,                            /* Input to VolumeMount: If set, it's OK for the file system */
  49.     volMountInteractMask        = 0x8000,                        /* to perform user interaction to mount the volume */
  50.     volMountChangedBit            = 14,                            /* Output from VoumeMount: If set, the volume was mounted, but */
  51.     volMountChangedMask            = 0x4000,                        /* the volume mounting information record needs to be updated. */
  52.     volMountFSReservedMask        = 0x00ff,                        /* bits 0-7 are defined by each file system for its own use */
  53.     volMountSysReservedMask        = 0xff00                        /* bits 8-15 are reserved for Apple system use */
  54. };
  55.  
  56. /*
  57.  * The new volume mount info record
  58.  */
  59. struct VolumeMountInfoHeader {
  60.     short                            length;                        /* length of location data (including self) */
  61.     VolumeType                        media;                        /* type of media (must be registered with Apple) */
  62.     short                            flags;                        /* volume mount flags. Variable length data follows */
  63. };
  64. typedef struct VolumeMountInfoHeader VolumeMountInfoHeader;
  65.  
  66. typedef VolumeMountInfoHeader *VolumeMountInfoHeaderPtr;
  67.  
  68.  
  69. enum {
  70.     gestaltFSMVersion            = 'fsm '
  71. };
  72.  
  73. typedef VCB *VCBPtr;
  74.  
  75. /*
  76.  * Miscellaneous file system values not in Files.h
  77.  */
  78.  
  79. enum {
  80.     fsUsrCNID                    = 16,                            /* First assignable directory or file number */
  81. /*    File system trap word attribute bits */
  82.     kHFSBit                        = 9,                            /* HFS call: bit 9 */
  83.     kHFSMask                    = 0x0200,
  84.     kAsyncBit                    = 10,                            /* Asynchronous call: bit 10 */
  85.     kAsyncMask                    = 0x0400
  86. };
  87.  
  88. /*
  89.  * HFSCIProc selectCode values
  90.  * Note: The trap attribute bits (the HFS bit and the asynchronous bit)
  91.  * may be set in these selectCode values.
  92.  */
  93. enum {
  94.     kFSMOpen                    = 0xA000,
  95.     kFSMClose                    = 0xA001,
  96.     kFSMRead                    = 0xA002,
  97.     kFSMWrite                    = 0xA003,
  98.     kFSMGetVolInfo                = 0xA007,
  99.     kFSMCreate                    = 0xA008,
  100.     kFSMDelete                    = 0xA009,
  101.     kFSMOpenRF                    = 0xA00A,
  102.     kFSMRename                    = 0xA00B,
  103.     kFSMGetFileInfo                = 0xA00C,
  104.     kFSMSetFileInfo                = 0xA00D,
  105.     kFSMUnmountVol                = 0xA00E,
  106.     kFSMMountVol                = 0xA00F,
  107.     kFSMAllocate                = 0xA010,
  108.     kFSMGetEOF                    = 0xA011,
  109.     kFSMSetEOF                    = 0xA012,
  110.     kFSMFlushVol                = 0xA013,
  111.     kFSMGetVol                    = 0xA014,
  112.     kFSMSetVol                    = 0xA015,
  113.     kFSMEject                    = 0xA017,
  114.     kFSMGetFPos                    = 0xA018,
  115.     kFSMOffline                    = 0xA035,
  116.     kFSMSetFilLock                = 0xA041,
  117.     kFSMRstFilLock                = 0xA042,
  118.     kFSMSetFilType                = 0xA043,
  119.     kFSMSetFPos                    = 0xA044,
  120.     kFSMFlushFile                = 0xA045,
  121. /*    The File System HFSDispatch selectCodes */
  122.     kFSMOpenWD                    = 0x0001,
  123.     kFSMCloseWD                    = 0x0002,
  124.     kFSMCatMove                    = 0x0005,
  125.     kFSMDirCreate                = 0x0006,
  126.     kFSMGetWDInfo                = 0x0007,
  127.     kFSMGetFCBInfo                = 0x0008,
  128.     kFSMGetCatInfo                = 0x0009,
  129.     kFSMSetCatInfo                = 0x000A,
  130.     kFSMSetVolInfo                = 0x000B,
  131.     kFSMLockRng                    = 0x0010,
  132.     kFSMUnlockRng                = 0x0011,
  133.     kFSMCreateFileIDRef            = 0x0014,
  134.     kFSMDeleteFileIDRef            = 0x0015,
  135.     kFSMResolveFileIDRef        = 0x0016,
  136.     kFSMExchangeFiles            = 0x0017,
  137.     kFSMCatSearch                = 0x0018,
  138.     kFSMOpenDF                    = 0x001A,
  139.     kFSMMakeFSSpec                = 0x001B,
  140. /*    The Desktop Manager HFSDispatch selectCodes */
  141.     kFSMDTGetPath                = 0x0020,
  142.     kFSMDTCloseDown                = 0x0021,
  143.     kFSMDTAddIcon                = 0x0022,
  144.     kFSMDTGetIcon                = 0x0023,
  145.     kFSMDTGetIconInfo            = 0x0024,
  146.     kFSMDTAddAPPL                = 0x0025,
  147.     kFSMDTRemoveAPPL            = 0x0026,
  148.     kFSMDTGetAPPL                = 0x0027,
  149.     kFSMDTSetComment            = 0x0028,
  150.     kFSMDTRemoveComment            = 0x0029,
  151.     kFSMDTGetComment            = 0x002A,
  152.     kFSMDTFlush                    = 0x002B,
  153.     kFSMDTReset                    = 0x002C,
  154.     kFSMDTGetInfo                = 0x002D,
  155.     kFSMDTOpenInform            = 0x002E,
  156.     kFSMDTDelete                = 0x002F,
  157. /*    The AppleShare HFSDispatch selectCodes */
  158.     kFSMGetVolParms                = 0x0030,
  159.     kFSMGetLogInInfo            = 0x0031,
  160.     kFSMGetDirAccess            = 0x0032,
  161.     kFSMSetDirAccess            = 0x0033,
  162.     kFSMMapID                    = 0x0034,
  163.     kFSMMapName                    = 0x0035,
  164.     kFSMCopyFile                = 0x0036,
  165.     kFSMMoveRename                = 0x0037,
  166.     kFSMOpenDeny                = 0x0038,
  167.     kFSMOpenRFDeny                = 0x0039,
  168.     kFSMGetXCatInfo                = 0x003A,
  169.     kFSMGetVolMountInfoSize        = 0x003F,
  170.     kFSMGetVolMountInfo            = 0x0040,
  171.     kFSMVolumeMount                = 0x0041,
  172.     kFSMShare                    = 0x0042,
  173.     kFSMUnShare                    = 0x0043,
  174.     kFSMGetUGEntry                = 0x0044,
  175.     kFSMGetForeignPrivs            = 0x0060,
  176.     kFSMSetForeignPrivs            = 0x0061
  177. };
  178.  
  179. /*
  180.  * UTDetermineVol status values
  181.  */
  182. enum {
  183.     dtmvError                    = 0,                            /* param error */
  184.     dtmvFullPathame                = 1,                            /* determined by full pathname */
  185.     dtmvVRefNum                    = 2,                            /* determined by volume refNum */
  186.     dtmvWDRefNum                = 3,                            /* determined by working directory refNum */
  187.     dtmvDriveNum                = 4,                            /* determined by drive number */
  188.     dtmvDefault                    = 5                                /* determined by default volume */
  189. };
  190.  
  191. /*
  192.  * UTGetBlock options
  193.  */
  194. enum {
  195.     gbDefault                    = 0,                            /* default value - read if not found */
  196. /*    bits and masks */
  197.     gbReadBit                    = 0,                            /* read block from disk (forced read) */
  198.     gbReadMask                    = 0x0001,
  199.     gbExistBit                    = 1,                            /* get existing cache block */
  200.     gbExistMask                    = 0x0002,
  201.     gbNoReadBit                    = 2,                            /* don't read block from disk if not found in cache */
  202.     gbNoReadMask                = 0x0004,
  203.     gbReleaseBit                = 3,                            /* release block immediately after GetBlock */
  204.     gbReleaseMask                = 0x0008
  205. };
  206.  
  207. /*
  208.  * UTReleaseBlock options
  209.  */
  210. enum {
  211.     rbDefault                    = 0,                            /* default value - just mark the buffer not in-use */
  212. /*    bits and masks */
  213.     rbWriteBit                    = 0,                            /* force write buffer to disk */
  214.     rbWriteMask                    = 0x0001,
  215.     rbTrashBit                    = 1,                            /* trash buffer contents after release */
  216.     rbTrashMask                    = 0x0002,
  217.     rbDirtyBit                    = 2,                            /* mark buffer dirty */
  218.     rbDirtyMask                    = 0x0004,
  219.     rbFreeBit                    = 3,                            /* free the buffer (save in the hash) */
  220. /*
  221.  *    rbFreeMask (rbFreeBit + rbTrashBit) works as rbTrash on < System 7.0 RamCache;
  222.  *    on >= System 7.0, rbfreeMask overrides rbTrash
  223.  */
  224.     rbFreeMask                    = 0x000A
  225. };
  226.  
  227. /*
  228.  * UTFlushCache options
  229.  */
  230. enum {
  231.     fcDefault                    = 0,                            /* default value - just flush any dirty buffers */
  232. /*    bits and masks */
  233.     fcTrashBit                    = 1,                            /* trash buffers after flushing */
  234.     fcTrashMask                    = 0x0002,
  235.     fcFreeBit                    = 3,                            /* free buffers after flushing */
  236.     fcFreeMask                    = 0x0008                        /* fcFreeMask works as fcTrash on < System 7.0 RamCache */
  237. };
  238.  
  239. /*
  240.  * UTCacheReadIP and UTCacheWriteIP cacheOption
  241.  */
  242. enum {
  243.     noCacheBit                    = 5,                            /* don't cache this please */
  244.     noCacheMask                    = 0x0020,
  245.     rdVerifyBit                    = 6,                            /* read verify */
  246.     rdVerifyMask                = 0x0040
  247. };
  248.  
  249. /*
  250.  * Cache routine internal error codes
  251.  */
  252. enum {
  253.     chNoBuf                        = 1,                            /* no free cache buffers (all in use) */
  254.     chInUse                        = 2,                            /* requested block in use */
  255.     chnotfound                    = 3,                            /* requested block not found */
  256.     chNotInUse                    = 4                                /* block being released was not in use */
  257. };
  258.  
  259. /*
  260.  * FCBRec.fcbFlags bits
  261.  */
  262. enum {
  263.     fcbWriteBit                    = 0,                            /* Data can be written to this file */
  264.     fcbWriteMask                = 0x01,
  265.     fcbResourceBit                = 1,                            /* This file is a resource fork */
  266.     fcbResourceMask                = 0x02,
  267.     fcbWriteLockedBit            = 2,                            /* File has a locked byte range */
  268.     fcbWriteLockedMask            = 0x04,
  269.     fcbSharedWriteBit            = 4,                            /* File is open for shared write access */
  270.     fcbSharedWriteMask            = 0x10,
  271.     fcbFileLockedBit            = 5,                            /* File is locked (write-protected) */
  272.     fcbFileLockedMask            = 0x20,
  273.     fcbOwnClumpBit                = 6,                            /* File has clump size specified in FCB */
  274.     fcbOwnClumpMask                = 0x40,
  275.     fcbModifiedBit                = 7,                            /* File has changed since it was last flushed */
  276.     fcbModifiedMask                = 0x80
  277. };
  278.  
  279. /*
  280.  * ExtFileProc options
  281.  */
  282. enum {
  283.     extendFileAllBit            = 0,                            /* allocate all requested bytes or none */
  284.     extendFileAllMask            = 0x0001,
  285.     extendFileContigBit            = 1,                            /* force contiguous allocation */
  286.     extendFileContigMask        = 0x0002
  287. };
  288.  
  289. /*
  290.  *    HFS Component Interface constants
  291.  */
  292. /*
  293.  * compInterfMask bits specific to HFS component
  294.  */
  295. enum {
  296.     hfsCIDoesHFSBit                = 23,                            /* set if file system supports HFS calls */
  297.     hfsCIDoesHFSMask            = 0x00800000,
  298.     hfsCIDoesAppleShareBit        = 22,                            /* set if AppleShare calls supported */
  299.     hfsCIDoesAppleShareMask        = 0x00400000,
  300.     hfsCIDoesDeskTopBit            = 21,                            /* set if Desktop Database calls supported */
  301.     hfsCIDoesDeskTopMask        = 0x00200000,
  302.     hfsCIDoesDynamicLoadBit        = 20,                            /* set if dynamically loading code resource */
  303.     hfsCIDoesDynamicLoadMask    = 0x00100000,                    /*        supported */
  304.     hfsCIResourceLoadedBit        = 19,                            /* set if code resource already loaded */
  305.     hfsCIResourceLoadedMask        = 0x00080000,
  306.     hfsCIHasHLL2PProcBit        = 18,                            /* set if FFS' log2PhyProc and Extendfile proc */
  307.     hfsCIHasHLL2PProcMask        = 0x00040000                    /* is written in a high level language. (i.e., uses Pascal calling convention) */
  308. };
  309.  
  310. /*
  311.  *    Disk Initialization Component Interface constants
  312.  */
  313. /*
  314.  * compInterfMask bits specific to Disk Initialization component
  315.  */
  316. enum {
  317.     diCIHasExtFormatParamsBit    = 18,                            /* set if file system needs extended format */
  318.     diCIHasExtFormatParamsMask    = 0x00040000,                    /*        parameters */
  319.     diCIHasMultiVolTypesBit        = 17,                            /* set if file system supports more than one */
  320.     diCIHasMultiVolTypesMask    = 0x00020000,                    /*        volume type */
  321.     diCIDoesSparingBit            = 16,                            /* set if file system supports disk sparing */
  322.     diCIDoesSparingMask            = 0x00010000,
  323.     diCILiveBit                    = 0,                            /* set if file system is candidate for current */
  324.     diCILiveMask                = 0x00000001                    /*        formatting operation (set by PACK2) */
  325. };
  326.  
  327. /*
  328.  * Disk Initialization Component Function selectors
  329.  */
  330. enum {
  331.     diCILoad                    = 1,                            /* Make initialization code memory resident */
  332.     diCIUnload                    = 2,                            /* Make initialization code purgeable */
  333.     diCIEvaluateSizeChoices        = 3,                            /* Evaluate size choices */
  334.     diCIExtendedZero            = 4,                            /* Write an empty volume directory */
  335.     diCIValidateVolName            = 5,                            /* Validate volume name */
  336.     diCIGetVolTypeInfo            = 6,                            /* get volume type info */
  337.     diCIGetFormatString            = 7,                            /* get dialog format string */
  338.     diCIGetExtFormatParams        = 8,                            /* get extended format parameters */
  339.     diCIGetDefectList            = 9                                /* return the defect list for the indicated disk - reserved for future use */
  340. };
  341.  
  342. /*
  343.  * Constants used in the DICIEvaluateSizeRec and FormatListRec
  344.  */
  345. enum {
  346.     diCIFmtListMax                = 8,                            /* maximum number of format list entries in DICIEvaluateSizeRec.numSizeEntries */
  347. /*    bits in FormatListRec.formatFlags: */
  348.     diCIFmtFlagsValidBit        = 7,                            /* set if sec, side, tracks valid */
  349.     diCIFmtFlagsValidMask        = 0x80,
  350.     diCIFmtFlagsCurrentBit        = 6,                            /* set if current disk has this fmt */
  351.     diCIFmtFlagsCurrentMask        = 0x40,
  352. /*    bits in FormatListRec.sizeListFlags: */
  353.     diCISizeListOKBit            = 15,                            /* set if this disk size usable */
  354.     diCISizeListOKMask            = 0x8000
  355. };
  356.  
  357. /*
  358.  * DICIGetFormatStringRec.stringKind format strings
  359.  */
  360. enum {
  361.     diCIAlternateFormatStr        = 1,                            /* get alternate format  string (Balloon Help) */
  362.     diCISizePresentationStr        = 2                                /* get size presentation string (for dialog) */
  363. };
  364.  
  365. /*
  366.  * Error codes returned by Disk Sparing
  367.  */
  368. enum {
  369.     diCIUserCancelErr            = 1,                            /* user cancelled the disk init */
  370.     diCICriticalSectorBadErr    = 20,                            /* critical sectors are bad (hopeless)    */
  371.     diCISparingFailedErr        = 21,                            /* disk cannot be spared */
  372.     diCITooManyBadSectorsErr    = 22,                            /* too many bad sectors */
  373.     diCIUnknownVolTypeErr        = 23,                            /* the volume type passed in diCIExtendedZero paramBlock is not supported */
  374.     diCIVolSizeMismatchErr        = 24,                            /* specified volume size doesn’t match with formatted disk size */
  375.     diCIUnknownDICallErr        = 25,                            /* bogus DI function call selector */
  376.     diCINoSparingErr            = 26,                            /* disk is bad but the target FS doesn't do disk sparing */
  377.     diCINoExtendInfoErr            = 27,                            /* missing file system specific extra parameter in diCIExtendedZero call */
  378.     diCINoMessageTextErr        = 28                            /* missing message text in DIReformat call */
  379. };
  380.  
  381. /*
  382.  *    File System Manager constants
  383.  */
  384. /*
  385.  * Miscellaneous constants used by FSM
  386.  */
  387. enum {
  388.     fsdVersion1                    = 1,                            /* current version of FSD record */
  389.     fsmIgnoreFSID                = 0xfffe,                        /* this FSID should be ignored by the driver */
  390.     fsmGenericFSID                = 0xffff                        /* unknown foreign file system ID */
  391. };
  392.  
  393. /*
  394.  * compInterfMask bits common to all FSM components
  395.  */
  396. enum {
  397.     fsmComponentEnableBit        = 31,                            /* set if FSM component interface is enabled */
  398.     fsmComponentEnableMask        = 0x80000000,
  399.     fsmComponentBusyBit            = 30,                            /* set if FSM component interface is busy */
  400.     fsmComponentBusyMask        = 0x40000000
  401. };
  402.  
  403. /*
  404.  * Selectors for GetFSInfo
  405.  */
  406. enum {
  407.     fsmGetFSInfoByIndex            = -1,                            /* get fs info by index */
  408.     fsmGetFSInfoByFSID            = 0,                            /* get fs info by FSID */
  409.     fsmGetFSInfoByRefNum        = 1                                /* get fs info by file/vol refnum */
  410. };
  411.  
  412. /*
  413.  * InformFSM messages
  414.  */
  415. enum {
  416.     fsmNopMessage                = 0,                            /* nop */
  417.     fsmDrvQElChangedMessage        = 1,                            /* DQE has changed */
  418.     fsmGetFSIconMessage            = 2                                /* Get FFS's disk icon */
  419. };
  420.  
  421. /*
  422.  * Messages passed to the fileSystemCommProc
  423.  */
  424. enum {
  425.     ffsNopMessage                = 0,                            /* nop, should always return noErr */
  426.     ffsGetIconMessage            = 1,                            /* return disk icon and mask */
  427.     ffsIDDiskMessage            = 2,                            /* identify the about-to-be-mounted volume */
  428.     ffsLoadMessage                = 3,                            /* load in the FFS */
  429.     ffsUnloadMessage            = 4,                            /* unload the FFS */
  430.     ffsIDVolMountMessage        = 5,                            /* identify a VolMountInfo record */
  431.     ffsInformMessage            = 6,                            /* FFS defined message */
  432.     ffsGetIconInfoMessage        = 7
  433. };
  434.  
  435. /*
  436.  * Error codes from FSM functions
  437.  */
  438. enum {
  439.     fsmFFSNotFoundErr            = -431,                            /* Foreign File system does not exist - new Pack2 could return this error too */
  440.     fsmBusyFFSErr                = -432,                            /* File system is busy, cannot be removed */
  441.     fsmBadFFSNameErr            = -433,                            /* Name length not 1 <= length <= 31 */
  442.     fsmBadFSDLenErr                = -434,                            /* FSD size incompatible with current FSM vers */
  443.     fsmDuplicateFSIDErr            = -435,                            /* FSID already exists on InstallFS */
  444.     fsmBadFSDVersionErr            = -436,                            /* FSM version incompatible with FSD */
  445.     fsmNoAlternateStackErr        = -437,                            /* no alternate stack for HFS CI */
  446.     fsmUnknownFSMMessageErr        = -438                            /* unknown message passed to FSM */
  447. };
  448.  
  449. /*
  450.  *    HFS Utility routine records
  451.  */
  452. /*
  453.  * record used by UTGetPathComponentName
  454.  */
  455. struct ParsePathRec {
  456.     StringPtr                        namePtr;                    /* pathname to parse */
  457.     short                            startOffset;                /* where to start parsing */
  458.     short                            componentLength;            /* the length of the pathname component parsed */
  459.     SignedByte                        moreName;                    /* non-zero if there are more components after this one */
  460.     SignedByte                        foundDelimiter;                /* non-zero if parsing stopped because a colon (:) delimiter was found */
  461. };
  462. typedef struct ParsePathRec ParsePathRec;
  463.  
  464. typedef ParsePathRec *ParsePathRecPtr;
  465.  
  466. struct WDCBRec {
  467.     VCBPtr                            wdVCBPtr;                    /* Pointer to VCB of this working directory */
  468.     long                            wdDirID;                    /* Directory ID number of this working directory */
  469.     long                            wdCatHint;                    /* Hint for finding this working directory */
  470.     long                            wdProcID;                    /* Process that created this working directory */
  471. };
  472. typedef struct WDCBRec WDCBRec;
  473.  
  474. typedef WDCBRec *WDCBRecPtr;
  475.  
  476. struct FCBRec {
  477.     unsigned long                    fcbFlNm;                    /* FCB file number. Non-zero marks FCB used */
  478.     SignedByte                        fcbFlags;                    /* FCB flags */
  479.     SignedByte                        fcbTypByt;                    /* File type byte */
  480.     unsigned short                    fcbSBlk;                    /* File start block (in alloc size blks) */
  481.     unsigned long                    fcbEOF;                        /* Logical length or EOF in bytes */
  482.     unsigned long                    fcbPLen;                    /* Physical file length in bytes */
  483.     unsigned long                    fcbCrPs;                    /* Current position within file */
  484.     VCBPtr                            fcbVPtr;                    /* Pointer to the corresponding VCB */
  485.     Ptr                                fcbBfAdr;                    /* File's buffer address */
  486.     unsigned short                    fcbFlPos;                    /* Directory block this file is in */
  487. /* FCB Extensions for HFS */
  488.     unsigned long                    fcbClmpSize;                /* Number of bytes per clump */
  489.     Ptr                                fcbBTCBPtr;                    /* Pointer to B*-Tree control block for file */
  490.     unsigned long                    fcbExtRec[3];                /* First 3 file extents */
  491.     OSType                            fcbFType;                    /* File's 4 Finder Type bytes */
  492.     unsigned long                    fcbCatPos;                    /* Catalog hint for use on Close */
  493.     unsigned long                    fcbDirID;                    /* Parent Directory ID */
  494.     Str31                            fcbCName;                    /* CName of open file */
  495. };
  496. typedef struct FCBRec FCBRec;
  497.  
  498. typedef FCBRec *FCBRecPtr;
  499.  
  500. /*
  501.  *    HFS Component Interface records
  502.  */
  503. typedef pascal OSErr (*Lg2PhysProcPtr)(void *fsdGlobalPtr, VCBPtr volCtrlBlockPtr, FCBRecPtr fileCtrlBlockPtr, short fileRefNum, unsigned long filePosition, unsigned long reqCount, unsigned long *volOffset, unsigned long *contiguousBytes);
  504.  
  505. #if GENERATINGCFM
  506. typedef UniversalProcPtr Lg2PhysUPP;
  507. #else
  508. typedef Lg2PhysProcPtr Lg2PhysUPP;
  509. #endif
  510.  
  511. enum {
  512.     uppLg2PhysProcInfo = kPascalStackBased
  513.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  514.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void*)))
  515.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(VCBPtr)))
  516.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(FCBRecPtr)))
  517.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
  518.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(unsigned long)))
  519.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(unsigned long)))
  520.          | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(unsigned long*)))
  521.          | STACK_ROUTINE_PARAMETER(8, SIZE_CODE(sizeof(unsigned long*)))
  522. };
  523.  
  524. #if GENERATINGCFM
  525. #define NewLg2PhysProc(userRoutine)        \
  526.         (Lg2PhysUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppLg2PhysProcInfo, GetCurrentArchitecture())
  527. #else
  528. #define NewLg2PhysProc(userRoutine)        \
  529.         ((Lg2PhysUPP) (userRoutine))
  530. #endif
  531.  
  532. #if GENERATINGCFM
  533. #define CallLg2PhysProc(userRoutine, fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes)        \
  534.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppLg2PhysProcInfo, (fsdGlobalPtr), (volCtrlBlockPtr), (fileCtrlBlockPtr), (fileRefNum), (filePosition), (reqCount), (volOffset), (contiguousBytes))
  535. #else
  536. #define CallLg2PhysProc(userRoutine, fsdGlobalPtr, volCtrlBlockPtr, fileCtrlBlockPtr, fileRefNum, filePosition, reqCount, volOffset, contiguousBytes)        \
  537.         (*(userRoutine))((fsdGlobalPtr), (volCtrlBlockPtr), (fileCtrlBlockPtr), (fileRefNum), (filePosition), (reqCount), (volOffset), (contiguousBytes))
  538. #endif
  539.  
  540. typedef pascal OSErr (*HFSCIProcPtr)(VCBPtr theVCB, short selectCode, void *paramBlock, void *fsdGlobalPtr, short fsid);
  541.  
  542. #if GENERATINGCFM
  543. typedef UniversalProcPtr HFSCIUPP;
  544. #else
  545. typedef HFSCIProcPtr HFSCIUPP;
  546. #endif
  547.  
  548. enum {
  549.     uppHFSCIProcInfo = kPascalStackBased
  550.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  551.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(VCBPtr)))
  552.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
  553.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
  554.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*)))
  555.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(short)))
  556. };
  557.  
  558. #if GENERATINGCFM
  559. #define NewHFSCIProc(userRoutine)        \
  560.         (HFSCIUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppHFSCIProcInfo, GetCurrentArchitecture())
  561. #else
  562. #define NewHFSCIProc(userRoutine)        \
  563.         ((HFSCIUPP) (userRoutine))
  564. #endif
  565.  
  566. #if GENERATINGCFM
  567. #define CallHFSCIProc(userRoutine, theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid)        \
  568.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppHFSCIProcInfo, (theVCB), (selectCode), (paramBlock), (fsdGlobalPtr), (fsid))
  569. #else
  570. #define CallHFSCIProc(userRoutine, theVCB, selectCode, paramBlock, fsdGlobalPtr, fsid)        \
  571.         (*(userRoutine))((theVCB), (selectCode), (paramBlock), (fsdGlobalPtr), (fsid))
  572. #endif
  573.  
  574. struct HFSCIRec {
  575.     long                            compInterfMask;                /* component flags */
  576.     HFSCIUPP                        compInterfProc;                /* pointer to file system call processing code */
  577.     Lg2PhysUPP                        log2PhyProc;                /* pointer to Lg2PhysProc() code */
  578.     Ptr                                stackTop;                    /* file system stack top */
  579.     long                            stackSize;                    /* file system stack size */
  580.     Ptr                                stackPtr;                    /* current file system stack pointer */
  581.     long                            reserved3;                    /* --reserved, must be zero-- */
  582.     long                            idSector;                    /* Sector you need to ID a local volume. For networked volumes, this must be -1 */
  583.     long                            reserved2;                    /* --reserved, must be zero-- */
  584.     long                            reserved1;                    /* --reserved, must be zero-- */
  585. };
  586. typedef struct HFSCIRec HFSCIRec;
  587.  
  588. typedef HFSCIRec *HFSCIRecPtr;
  589.  
  590. /*
  591.  *    Disk Initialization Component Interface records
  592.  */
  593. typedef pascal OSErr (*DICIProcPtr)(short whatFunction, void *paramBlock, void *fsdGlobalPtr);
  594.  
  595. #if GENERATINGCFM
  596. typedef UniversalProcPtr DICIUPP;
  597. #else
  598. typedef DICIProcPtr DICIUPP;
  599. #endif
  600.  
  601. enum {
  602.     uppDICIProcInfo = kPascalStackBased
  603.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  604.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  605.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void*)))
  606.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
  607. };
  608.  
  609. #if GENERATINGCFM
  610. #define NewDICIProc(userRoutine)        \
  611.         (DICIUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDICIProcInfo, GetCurrentArchitecture())
  612. #else
  613. #define NewDICIProc(userRoutine)        \
  614.         ((DICIUPP) (userRoutine))
  615. #endif
  616.  
  617. #if GENERATINGCFM
  618. #define CallDICIProc(userRoutine, whatFunction, paramBlock, fsdGlobalPtr)        \
  619.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDICIProcInfo, (whatFunction), (paramBlock), (fsdGlobalPtr))
  620. #else
  621. #define CallDICIProc(userRoutine, whatFunction, paramBlock, fsdGlobalPtr)        \
  622.         (*(userRoutine))((whatFunction), (paramBlock), (fsdGlobalPtr))
  623. #endif
  624.  
  625. struct DICIRec {
  626.     long                            compInterfMask;                /* component flags */
  627.     DICIUPP                            compInterfProc;                /* pointer to call processing code */
  628.     short                            maxVolNameLength;            /* maximum length of your volume name */
  629.     unsigned short                    blockSize;                    /* your file system's block size */
  630.     long                            reserved3;                    /* --reserved, must be zero-- */
  631.     long                            reserved2;                    /* --reserved, must be zero-- */
  632.     long                            reserved1;                    /* --reserved, must be zero-- */
  633. };
  634. typedef struct DICIRec DICIRec;
  635.  
  636. typedef DICIRec *DICIRecPtr;
  637.  
  638. /*
  639.  * FormatListRec as returned by the .Sony disk driver's
  640.  * Return Format List status call (csCode = 6).
  641.  * If the status call to get this list for a drive is not
  642.  * implemented by the driver, then a list with one entry
  643.  * is contructed from the drive queue element for the drive.
  644.  */
  645. struct FormatListRec {
  646.     unsigned long                    volSize;                    /* disk capacity in SECTORs */
  647.     SignedByte                        formatFlags;                /* flags */
  648.     SignedByte                        sectorsPerTrack;            /* sectors per track side */
  649.     unsigned short                    tracks;                        /* number of tracks */
  650. };
  651. typedef struct FormatListRec FormatListRec;
  652.  
  653. typedef FormatListRec *FormatListRecPtr;
  654.  
  655. /*
  656.  * SizeListRec built from FormatListRecs as described above.
  657.  */
  658. struct SizeListRec {
  659.     short                            sizeListFlags;                /* flags as set by external file system */
  660.     FormatListRec                    sizeEntry;                    /* disk driver format list record */
  661. };
  662. typedef struct SizeListRec SizeListRec;
  663.  
  664. typedef SizeListRec *SizeListRecPtr;
  665.  
  666. /*
  667.  * paramBlock for the diCIEvaluateSize call
  668.  */
  669. struct DICIEvaluateSizeRec {
  670.     short                            defaultSizeIndex;            /* default size for this FS */
  671.     short                            numSizeEntries;                /* number of size entries */
  672.     short                            driveNumber;                /* drive number */
  673.     SizeListRecPtr                    sizeListPtr;                /* ptr to size entry table */
  674.     unsigned short                    sectorSize;                    /* bytes per sector */
  675. };
  676. typedef struct DICIEvaluateSizeRec DICIEvaluateSizeRec;
  677.  
  678. typedef DICIEvaluateSizeRec *DICIEvaluateSizeRecPtr;
  679.  
  680. /*
  681.  * paramBlock for the diCIExtendedZero call
  682.  */
  683. struct DICIExtendedZeroRec {
  684.     short                            driveNumber;                /* drive number */
  685.     StringPtr                        volNamePtr;                    /* ptr to volume name string */
  686.     short                            fsid;                        /* file system ID */
  687.     short                            volTypeSelector;            /* volume type selector, if supports more than 1 type */
  688.     unsigned short                    numDefectBlocks;            /* number of bad logical blocks */
  689.     unsigned short                    defectListSize;                /* size of the defect list buffer in bytes */
  690.     Ptr                                defectListPtr;                /* pointer to defect list buffer */
  691.     unsigned long                    volSize;                    /* size of volume in SECTORs */
  692.     unsigned short                    sectorSize;                    /* bytes per sector */
  693.     Ptr                                extendedInfoPtr;            /* ptr to extended info */
  694. };
  695. typedef struct DICIExtendedZeroRec DICIExtendedZeroRec;
  696.  
  697. typedef DICIExtendedZeroRec *DICIExtendedZeroRecPtr;
  698.  
  699. /*
  700.  * paramBlock for the diCIValidateVolName call
  701.  */
  702. struct DICIValidateVolNameRec {
  703.     char                            theChar;                    /* the character to validate */
  704.     Boolean                            hasMessageBuffer;            /* false if no message */
  705.     short                            charOffset;                    /* position of the current character (first char = 1) */
  706.     StringPtr                        messageBufferPtr;            /* pointer to message buffer or nil */
  707.     short                            charByteType;                /* theChar's byte type (smSingleByte, smFirstByte, or smLastByte) */
  708. };
  709. typedef struct DICIValidateVolNameRec DICIValidateVolNameRec;
  710.  
  711. typedef DICIValidateVolNameRec *DICIValidateVolNameRecPtr;
  712.  
  713. /*
  714.  * paramBlock for the diCIGetVolTypeInfo call
  715.  */
  716. struct DICIGetVolTypeInfoRec {
  717.     unsigned long                    volSize;                    /* size of volume in SECTORs */
  718.     unsigned short                    sectorSize;                    /* bytes per sector */
  719.     short                            numVolTypes;                /* number of volume types supported */
  720.     Str31                            volTypesBuffer[4];            /* 4 string buffers */
  721. };
  722. typedef struct DICIGetVolTypeInfoRec DICIGetVolTypeInfoRec;
  723.  
  724. typedef DICIGetVolTypeInfoRec *DICIGetVolTypeInfoRecPtr;
  725.  
  726. /*
  727.  * paramBlock for the diCIGetFormatString call
  728.  */
  729. struct DICIGetFormatStringRec {
  730.     unsigned long                    volSize;                    /* volume size in SECTORs */
  731.     unsigned short                    sectorSize;                    /* sector size */
  732.     short                            volTypeSelector;            /* volume type selector */
  733.     short                            stringKind;                    /* sub-function = type of string */
  734.     Str255                            stringBuffer;                /* string buffer */
  735. };
  736. typedef struct DICIGetFormatStringRec DICIGetFormatStringRec;
  737.  
  738. typedef DICIGetFormatStringRec *DICIGetFormatStringRecPtr;
  739.  
  740. /*
  741.  * paramBlock for the diCIGetExtendedFormatParams call
  742.  */
  743. struct DICIGetExtendedFormatRec {
  744.     short                            driveNumber;                /* drive number */
  745.     short                            volTypeSelector;            /* volume type selector or 0 */
  746.     unsigned long                    volSize;                    /* size of volume in SECTORs */
  747.     unsigned short                    sectorSize;                    /* bytes per sector */
  748.     FSSpecPtr                        fileSystemSpecPtr;            /* pointer to the foreign file system's FSSpec */
  749.     Ptr                                extendedInfoPtr;            /* pointer to extended parameter structure */
  750. };
  751. typedef struct DICIGetExtendedFormatRec DICIGetExtendedFormatRec;
  752.  
  753. typedef DICIGetExtendedFormatRec *DICIGetExtendedFormatRecPtr;
  754.  
  755. /*
  756.  *    File System Manager records
  757.  */
  758. typedef pascal OSErr (*FSDCommProcPtr)(short message, void *paramBlock, void *globalsPtr);
  759.  
  760. #if GENERATINGCFM
  761. typedef UniversalProcPtr FSDCommUPP;
  762. #else
  763. typedef FSDCommProcPtr FSDCommUPP;
  764. #endif
  765.  
  766. enum {
  767.     uppFSDCommProcInfo = kPascalStackBased
  768.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  769.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
  770.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void*)))
  771.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void*)))
  772. };
  773.  
  774. #if GENERATINGCFM
  775. #define NewFSDCommProc(userRoutine)        \
  776.         (FSDCommUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppFSDCommProcInfo, GetCurrentArchitecture())
  777. #else
  778. #define NewFSDCommProc(userRoutine)        \
  779.         ((FSDCommUPP) (userRoutine))
  780. #endif
  781.  
  782. #if GENERATINGCFM
  783. #define CallFSDCommProc(userRoutine, message, paramBlock, globalsPtr)        \
  784.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppFSDCommProcInfo, (message), (paramBlock), (globalsPtr))
  785. #else
  786. #define CallFSDCommProc(userRoutine, message, paramBlock, globalsPtr)        \
  787.         (*(userRoutine))((message), (paramBlock), (globalsPtr))
  788. #endif
  789.  
  790. struct FSDRec {
  791.     struct FSDRec                    *fsdLink;                    /* ptr to next */
  792.     short                            fsdLength;                    /* length of this FSD in BYTES */
  793.     short                            fsdVersion;                    /* version number */
  794.     short                            fileSystemFSID;                /* file system id */
  795.     Str31                            fileSystemName;                /* file system name */
  796.     FSSpec                            fileSystemSpec;                /* foreign file system's FSSpec */
  797.     Ptr                                fileSystemGlobalsPtr;        /* ptr to file system globals */
  798.     FSDCommUPP                        fileSystemCommProc;            /* communication proc with the FFS */
  799.     long                            reserved3;                    /* --reserved, must be zero-- */
  800.     long                            reserved2;                    /* --reserved, must be zero-- */
  801.     long                            reserved1;                    /* --reserved, must be zero-- */
  802.     HFSCIRec                        fsdHFSCI;                    /* HFS component interface    */
  803.     DICIRec                            fsdDICI;                    /* Disk Initialization component interface */
  804. };
  805. typedef struct FSDRec FSDRec;
  806.  
  807. typedef FSDRec *FSDRecPtr;
  808.  
  809. struct FSMGetIconInfoRec {
  810.     long                            theIcon[32];                /* The ICN# structure */
  811.     long                            theMask[32];                /* The mask for the icon above */
  812.     Str255                            whereStr;
  813. };
  814. typedef struct FSMGetIconInfoRec FSMGetIconInfoRec;
  815.  
  816. typedef FSMGetIconInfoRec *FSMGetIconInfoRecPtr;
  817.  
  818. /*
  819.  * paramBlock for ffsGetIconMessage and fsmGetFSIconMessage
  820.  */
  821. struct FSMGetIconRec {
  822.     short                            refNum;                        /* target drive num or volume refnum */
  823.     FSMGetIconInfoRecPtr            iconBufferPtr;                /* pointer to icon buffer */
  824.     long                            requestSize;                /* requested size of the icon buffer */
  825.     long                            actualSize;                    /* actual size of the icon data returned */
  826.     SInt8                            iconType;                    /* kind of icon */
  827.     Boolean                            isEjectable;                /* true if the device is ejectable */
  828.     DrvQElPtr                        driveQElemPtr;                /* pointer to DQE */
  829.     FSSpecPtr                        fileSystemSpecPtr;            /* pointer to foreign file system's FSSpec */
  830.     long                            reserved1;                    /* --reserved, must be zero-- */
  831. };
  832. typedef struct FSMGetIconRec FSMGetIconRec;
  833.  
  834. typedef FSMGetIconRec *FSMGetIconRecPtr;
  835.  
  836. /*
  837.  *    HFS Utility routine prototypes
  838.  */
  839. extern pascal OSErr UTAllocateFCB(short *fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  840.  TWOWORDINLINE(0x7000, 0xA824);
  841. extern pascal OSErr UTReleaseFCB(short fileRefNum)
  842.  TWOWORDINLINE(0x7001, 0xA824);
  843. extern pascal OSErr UTLocateFCB(VCBPtr volCtrlBlockPtr, unsigned long fileNum, StringPtr namePtr, short *fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  844.  TWOWORDINLINE(0x7002, 0xA824);
  845. extern pascal OSErr UTLocateNextFCB(VCBPtr volCtrlBlockPtr, unsigned long fileNum, StringPtr namePtr, short *fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  846.  TWOWORDINLINE(0x7003, 0xA824);
  847. extern pascal OSErr UTIndexFCB(VCBPtr volCtrlBlockPtr, short *fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  848.  TWOWORDINLINE(0x7004, 0xA824);
  849. extern pascal OSErr UTResolveFCB(short fileRefNum, FCBRecPtr *fileCtrlBlockPtr)
  850.  TWOWORDINLINE(0x7005, 0xA824);
  851. extern pascal OSErr UTAllocateVCB(unsigned short *sysVCBLength, VCBPtr *volCtrlBlockPtr, unsigned short addSize)
  852.  TWOWORDINLINE(0x7006, 0xA824);
  853. extern pascal OSErr UTAddNewVCB(short driveNum, short *vRefNum, VCBPtr volCtrlBlockPtr)
  854.  TWOWORDINLINE(0x7007, 0xA824);
  855. extern pascal OSErr UTDisposeVCB(VCBPtr volCtrlBlockPtr)
  856.  TWOWORDINLINE(0x7008, 0xA824);
  857. extern pascal OSErr UTLocateVCBByRefNum(short refNum, short *vRefNum, VCBPtr *volCtrlBlockPtr)
  858.  TWOWORDINLINE(0x7009, 0xA824);
  859. extern pascal OSErr UTLocateVCBByName(StringPtr namePtr, short *moreMatches, short *vRefNum, VCBPtr *volCtrlBlockPtr)
  860.  TWOWORDINLINE(0x700A, 0xA824);
  861. extern pascal OSErr UTLocateNextVCB(StringPtr namePtr, short *moreMatches, short *vRefNum, VCBPtr *volCtrlBlockPtr)
  862.  TWOWORDINLINE(0x700B, 0xA824);
  863. extern pascal OSErr UTAllocateWDCB(WDPBPtr paramBlock)
  864.  TWOWORDINLINE(0x700C, 0xA824);
  865. extern pascal OSErr UTReleaseWDCB(short wdRefNum)
  866.  TWOWORDINLINE(0x700D, 0xA824);
  867. extern pascal OSErr UTResolveWDCB(long procID, short wdIndex, short wdRefNum, WDCBRecPtr *wdCtrlBlockPtr)
  868.  TWOWORDINLINE(0x700E, 0xA824);
  869. extern pascal OSErr UTFindDrive(short driveNum, DrvQElPtr *driveQElementPtr)
  870.  TWOWORDINLINE(0x700F, 0xA824);
  871. extern pascal OSErr UTAdjustEOF(short fileRefNum)
  872.  TWOWORDINLINE(0x7010, 0xA824);
  873. extern pascal OSErr UTSetDefaultVol(long nodeHint, unsigned long dirID, short refNum)
  874.  TWOWORDINLINE(0x7011, 0xA824);
  875. extern pascal OSErr UTGetDefaultVol(WDPBPtr paramBlock)
  876.  TWOWORDINLINE(0x7012, 0xA824);
  877. extern pascal OSErr UTEjectVol(VCBPtr volCtrlBlockPtr)
  878.  TWOWORDINLINE(0x702B, 0xA824);
  879. extern pascal OSErr UTCheckWDRefNum(short wdRefNum)
  880.  TWOWORDINLINE(0x7013, 0xA824);
  881. extern pascal OSErr UTCheckFileRefNum(short fileRefNum)
  882.  TWOWORDINLINE(0x7014, 0xA824);
  883. extern pascal OSErr UTCheckVolRefNum(short vRefNum)
  884.  TWOWORDINLINE(0x7015, 0xA824);
  885. extern pascal OSErr UTCheckPermission(VCBPtr volCtrlBlockPtr, short *modByte, unsigned long fileNum, ParmBlkPtr paramBlock)
  886.  TWOWORDINLINE(0x7016, 0xA824);
  887. extern pascal OSErr UTCheckVolOffline(short vRefNum)
  888.  TWOWORDINLINE(0x7017, 0xA824);
  889. extern pascal OSErr UTCheckVolModifiable(short vRefNum)
  890.  TWOWORDINLINE(0x7018, 0xA824);
  891. extern pascal OSErr UTCheckFileModifiable(short fileRefNum)
  892.  TWOWORDINLINE(0x7019, 0xA824);
  893. extern pascal OSErr UTCheckDirBusy(VCBPtr volCtrlBlockPtr, unsigned long dirID)
  894.  TWOWORDINLINE(0x701A, 0xA824);
  895. extern pascal OSErr UTParsePathname(short *volNamelength, StringPtr namePtr)
  896.  TWOWORDINLINE(0x701B, 0xA824);
  897. extern pascal OSErr UTGetPathComponentName(ParsePathRecPtr parseRec)
  898.  TWOWORDINLINE(0x701C, 0xA824);
  899. extern pascal OSErr UTDetermineVol(ParmBlkPtr paramBlock, short *status, short *moreMatches, short *vRefNum, VCBPtr *volCtrlBlockPtr)
  900.  TWOWORDINLINE(0x701D, 0xA824);
  901. extern pascal OSErr UTGetBlock(short refNum, void *log2PhyProc, unsigned long blockNum, short gbOption, Ptr *buffer)
  902.  TWOWORDINLINE(0x701F, 0xA824);
  903. extern pascal OSErr UTReleaseBlock(Ptr buffer, short rbOption)
  904.  TWOWORDINLINE(0x7020, 0xA824);
  905. extern pascal OSErr UTFlushCache(short refNum, short fcOption)
  906.  TWOWORDINLINE(0x7021, 0xA824);
  907. extern pascal OSErr UTMarkDirty(Ptr buffer)
  908.  TWOWORDINLINE(0x7023, 0xA824);
  909. extern pascal OSErr UTTrashVolBlocks(VCBPtr volCtrlBlockPtr)
  910.  TWOWORDINLINE(0x7024, 0xA824);
  911. extern pascal OSErr UTTrashFileBlocks(VCBPtr volCtrlBlockPtr, unsigned long fileNum)
  912.  TWOWORDINLINE(0x7025, 0xA824);
  913. extern pascal OSErr UTTrashBlocks(unsigned long beginPosition, unsigned long byteCount, VCBPtr volCtrlBlockPtr, short fileRefNum, short tbOption)
  914.  TWOWORDINLINE(0x7026, 0xA824);
  915. extern pascal OSErr UTCacheReadIP(void *log2PhyProc, unsigned long filePosition, Ptr ioBuffer, short fileRefNum, unsigned long reqCount, unsigned long *actCount, short cacheOption)
  916.  TWOWORDINLINE(0x7027, 0xA824);
  917. extern pascal OSErr UTCacheWriteIP(void *log2PhyProc, unsigned long filePosition, Ptr ioBuffer, short fileRefNum, unsigned long reqCount, unsigned long *actCount, short cacheOption)
  918.  TWOWORDINLINE(0x7028, 0xA824);
  919. extern pascal OSErr UTBlockInFQHashP(short vRefNum, unsigned long diskBlock)
  920.  TWOWORDINLINE(0x702C, 0xA824);
  921. /*
  922.  *    File System Manager call prototypes
  923.  */
  924. extern pascal OSErr InstallFS(FSDRecPtr fsdPtr);
  925. extern pascal OSErr RemoveFS(short fsid);
  926. extern pascal OSErr SetFSInfo(short fsid, short bufSize, FSDRecPtr fsdPtr);
  927. extern pascal OSErr GetFSInfo(short selector, short key, short *bufSize, FSDRecPtr fsdPtr);
  928. extern pascal OSErr InformFSM(short theMessage, void *paramBlock);
  929. extern pascal OSErr InformFFS(short fsid, void *paramBlock);
  930.  
  931. #if PRAGMA_IMPORT_SUPPORTED
  932. #pragma import off
  933. #endif
  934.  
  935. #if PRAGMA_ALIGN_SUPPORTED
  936. #pragma options align=reset
  937. #endif
  938.  
  939. #ifdef __cplusplus
  940. }
  941. #endif
  942.  
  943. #endif /* __FSM__ */
  944.